class DiscordIcon extends DiscordIconUI{

    private static _instance:DiscordIcon;//聊天图标

    constructor(){
        super();
        //添加侦听
        this.on(Laya.Event.CLICK,this,this.openDiscordHandler);
    }

    /**
     * 获取 单例
     */
    public static getInstance():DiscordIcon{
        if(DiscordIcon._instance == null){
            DiscordIcon._instance = new DiscordIcon();
        }
        return DiscordIcon._instance;
    }

    //打开discord
    private openDiscordHandler():void{
        window.open("https://discord.gg/4vs39rE");
    }

    /**
     * 打开
     */
    public open():void{
        UIManager.broadLayer.addChild(this);
    }
}